// pages/test/index.js
Page({
data:{
  list:[
    {name:'mary',socre:{js:100,miniapp:90,php:80}},
    {name:'lisa',socre:{js:98,miniapp:92,php:89}},
    {name:'tom',socre:{js:80,miniapp:96,php:84}},
    {name:'john',socre:{js:92,miniapp:87,php:94}}
  ]
 },
 click(e){
   console.log(e)
   const index = e.currentTarget.dataset.id
   const sum= this.data.list[index].socre.js +
              this.data.list[index].socre.miniapp +
              this.data.list[index].socre.php 
     wx.showToast({
     title:this.data.list[index].name+'总分：'+sum,
   })
  }
})